package edu.whu.puppygo.entity;

import com.alibaba.fastjson.annotation.JSONField;
import edu.whu.puppygo.base.BaseEntity;
import edu.whu.puppygo.config.OssConfig;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;


/**
 * @author guanruwang
 * @date 2023/11/8$
 */

@EqualsAndHashCode(callSuper = true)
@Entity
@Data
public class User extends BaseEntity {
    /**
     * 手机号
     */
    @ApiModelProperty("手机号")
    @Column(unique = true)
    String username;
    /**
     * 账号
     */
    @ApiModelProperty("账号")
    @Column(unique = true)
    String account;

    /**
     * 头像
     */
    @ApiModelProperty("头像")
    String avatar = OssConfig.getFullUrl() + OssConfig.getPicPath() + "defaultAvatar.jpg";

    /**
     * 昵称
     */
    @ApiModelProperty("昵称")
    String nickname = "用户312120";

    @ApiModelProperty("加密后的密码")
    @JSONField(serialize = false)
    String password = "$2a$10$NSkw0hFsqNs.nMqKi.NGpeyyORZ3ovSjzGeBPzUcZQHF1YOzGuHHq";

    /**
     * 性别
     */
    @ApiModelProperty("性别")
    String gender = "";

    /**
     * 生日
     */
    @ApiModelProperty("生日")
    String birthday = "";

    /**
     * 地址
     */
    @ApiModelProperty("地址")
    String fullLocation = "";

    /**
     * 省份
     */
    @ApiModelProperty("省份")
    String provinceCode = "";

    /**
     * 城市
     */
    @ApiModelProperty("城市")
    String cityCode = "";

    /**
     * 区县
     */
    @ApiModelProperty("区县")
    String countryCode = "";

    /**
     * 职业
     */
    @ApiModelProperty("职业")
    String profession = "";

    /**
     * 主宠Id
     */
    @ApiModelProperty("主宠Id")
    Long mainPetId;
}


